//
//  xesApp.h
//  AFNetworking
//
//  Created by tianlong on 2018/9/24.
//

#import "WXJSObject.h"
#import <JavaScriptCore/JavaScriptCore.h>

/** JS专用 */
@protocol xesAppProtocol <JSExport>
/**
 检查设备权限
 permissionType    int    权限类型，见类型说明
 callBackMethod    string    回调函数
 */
- (void)checkPermission:(id)params;
- (void)changeNavgationBarTitle:(id)params;
- (void)changeNavgationBarBackgroundColor:(id)params;
- (void)showNavgationBarRightButton:(id)params;
- (void)changeTitleColor:(id)params;
@end

/** 自身的代理 */
@protocol xesAppDelegate <NSObject>
@optional
- (void)checkPermission:(id)params;
- (void)changeNavgationBarTitle:(id)params;
- (void)changeNavgationBarBackgroundColor:(id)params;
- (void)showNavgationBarRightButton:(id)params;
- (void)changeTitleColor:(id)params;
@end

@interface xesApp : WXJSObject<xesAppProtocol>
/** 记录上一次的状态 */
@property (nonatomic, assign) BOOL lastBarTranslucen;
/** 记录上一次的颜色 */
@property (nonatomic, strong) UIColor *lastBarTintColor;
@end
